package petClinic;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.*;


@Entity
@Table(name = "VET")
public class Vet extends Person {

	@ManyToMany
	@JoinTable(name="SPECIALTIES_VETS",
			joinColumns = { @JoinColumn(name="PERSON_ID") },
			inverseJoinColumns = { @JoinColumn(name="SPECIALTY_ID") })
	private Set<VetSpecialty> specialties = new HashSet<>();
	
	public Vet(){
		
	}

	public Vet(String firstName, String lastName, String email,
			Set<VetSpecialty> specialties) {
		super(firstName, lastName, email);
		this.specialties = specialties;
	}
	
	public Set<VetSpecialty> getSpecialties() {
		return specialties;
	}

	public void setSpecialties(Set<VetSpecialty> specialties) {
		this.specialties = specialties;
	}
	
}
